/*
 * Button.h
 */
#ifndef _BUTTON_H_
#define _BUTTON_H_

#include <allegro.h>
#include <string>
#include "defs.h"
#include "Component.h"
#include "GraphicContext.h"

namespace gui
  {

    class Button : public Component
      {
        bool _pressed;
        std::string _title;

      protected:
        GraphicContext _bgGc;
        GraphicContext _fgGc;
        GraphicContext _borderGc;

      public:
        Button();
        virtual void process();
        virtual void init();
        virtual void paint(BITMAP *buffer, int x_offset, int y_offset);

        virtual std::string const& title() const;
        virtual std::string const& title(std::string title);

        virtual GraphicContext& bgGc();
        virtual GraphicContext& fgGc();
        virtual GraphicContext& borderGc();
      };

  }

#endif
